import {get, post} from "@/axios/http.js";
import {BASEURL} from '@/api/baseUrl.js';

//添加菜单
export const addMenu = (param) => {
    return post(BASEURL + "/memu/add", param);
}

//修改菜单
export const updateMenu = (param) => {
    return post(BASEURL + "/memu/update", param);
}

//删除菜单
export const deleteMenu = (param) => {
    return post(BASEURL + "/memu/delete", param);
}

//获取菜单
export const getMenuList = (param) => {
    return post(BASEURL + "/memu/list",param);
}

//通过角色id获取已关联的菜单
export const getMenuByRole = (param) => {
    return post(BASEURL + "/memu/search/menu/by/role",param);
}

//通过登录用户获取已关联的菜单
export const getMenuByUser = () => {
    return get(BASEURL + "/memu/search/menu/by/user");
}



